package com.groupbuying.customerconsumer.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 用户中心消息MQ配置文件
 *
 * @Author Vincentxin
 * @Date 2019-05-10
 */
@Component
public class CustomerMQConfig {
    //本中心Topic
    public static String TOPIC;
    public static String GROUP_ID;
    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";


    //注入对应本中心的topic
    @Value("${RocketMQ_Key.Customer.Topic}")
    private void setTOPIC(String TOPIC) {
        CustomerMQConfig.TOPIC = TOPIC;
    }

    //注入对应本中心的groupId
    @Value("${RocketMQ_Key.Customer.GroupId}")
    private void setGroupId(String GROUPID) {
        CustomerMQConfig.GROUP_ID = GROUPID;
    }

    //用户中心手机号授权新增用户
    public static final String TAG_CUSTOMER_PHONE_NEW = "PHONENEW";
    //用户中心手机号授权修改用户
    public static final String TAG_CUSTOMER_PHONE_UPDATE = "PHONEUPDATE";

    //优惠买单用，微信注册新增用户
    public static final String TAG_CUSTOMER_WX_REGISTER_NEW="WXREGISTERNEW";

    //支付宝注册新增用户
    public static final String TAG_CUSTOMER_ALIPAY_REGISTER_NEW="ALIPAYREGISTERNEW";

    public static final String TAG_ALL = "*";


}
